include ../../build/config.mk
DBS_DIR=$(INSTALL_DIR)/dbs
BIN_DIR=$(DBS_DIR)/bin
CC = gcc
INCLUDE = -I../../dep/mxml/include/ -I../../dep/zlog/include -I../../dep/curl/include/curl -I../../dep/openssl/include -I../../dep/mysqlconnector/include -I../cipher -I../public/
LIB =  -L../../dep/mxml/lib -L../../dep/zlog/lib -L../../dep/curl/lib -L../../dep/openssl/lib -L../../dep/mysqlconnector/lib 

BIN = lkt-datasync
SRC = lktdatasync.c cJSON.c memcheck.c ../cipher/lktcipher.c
LDFLAGS=-Wl,-rpath-link ../../dep/openssl/lib -lzlog -lmxml -lcrypto -lcurl -lmysqlclient -lm -lpthread
all:
	$(CC) $(CFLAGS) $(SRC) -o $(BIN) $(LDFLAGS) $(INCLUDE) $(LIB) -DINSTALL_DIR=\"$(INSTALL_DIR)\" -Wall
install:
	cp $(BIN) $(BIN_DIR) -fr

clean:
	rm -fr $(BIN)
